﻿<UserControl x:Class="MyFloridaHouse.libSvOpenDistricts.Dialogs.FileListDlgView"
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"  
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400"
    Visibility="{Binding isDlgActive, Converter={StaticResource ConvertBoolToVisibility}}"
               Width="500" Height="250" 
             >


    <UserControl.Resources>
        <!-- 
            NOTE: All dictionaries are picked up in the App.xaml, including styles here allows us to see the effects in the Visual Studio Designer
            NOTE: The converter staticResources will show up here as "Could not be resolved", but they will be picked up from App.xaml at runtime
        -->
        <ResourceDictionary Source="/libSvCommonUtilities;component/Resources/Styles.xaml"/>
    </UserControl.Resources>
    <!---->
    <Border Margin="0"  CornerRadius="20" BorderBrush="#FF549D9D"  BorderThickness="2"  
            Background="{StaticResource MainPageBackgroundBrush}"
            >


            <Grid Margin="15">
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto" />
                    <RowDefinition Height="auto" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>

                    <sdk:Label Grid.Row="0" Grid.Column="0" Content="{Binding title}" Style="{StaticResource lblMessageStyle}"/>
                    <sdk:Label Grid.Row="1" Grid.Column="0" Content="{Binding selectedFileName}" Style="{StaticResource lblMessageStyle}"/>

                <ListBox Grid.Row="2" Grid.Column="0" Margin="0"   
                                     ItemsSource="{Binding fileNameList}"  
                                     SelectedIndex="{Binding fileNameListSelectedIndex, Mode=TwoWay}" Background="Azure" 
                                     VerticalAlignment="Stretch"
                                     HorizontalAlignment="Stretch"
                            >
                        <ListBox.ItemsPanel>
                            <ItemsPanelTemplate>
                                <StackPanel UseLayoutRounding="True" />
                            </ItemsPanelTemplate>
                        </ListBox.ItemsPanel>
                        <ListBox.Template>
                            <ControlTemplate>
                                <ScrollViewer>
                                    <ItemsPresenter />
                                </ScrollViewer>
                            </ControlTemplate>
                        </ListBox.Template>
                        <ListBox.ItemTemplate >
                            <DataTemplate >
                                <sdk:Label Content="{Binding fileName}"/>
                            </DataTemplate>
                        </ListBox.ItemTemplate>

                    </ListBox>

                <StackPanel Grid.Row="3"  Orientation="Horizontal" HorizontalAlignment="Right" Margin="15">
                        <Button x:Name="CancelButton" Content="Cancel" Command="{Binding CmdCancel}" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,0,0"  />
                        <Button x:Name="OKButton" Content="OK" Command="{Binding CmdOK}" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,0,0"  />
                    </StackPanel>                    
                </Grid>
        </Border>
</UserControl>
